import request from "@/apps/admin/units/request"
import {HttpResult, HttpResultData} from "@/types/project";

/**
 * 用户标签相关
 */
export const POWER: any = {
    LIST: 'user.tags.lists',
    CREATED: 'user.tags.created',
    UPDATED: 'user.tags.updated',
    DELETED: 'user.tags.delete'
}


/**
 * 获取广告信息
 * @returns {*}
 */
export function getUserTagsListApi(where: any): Promise<HttpResultData<any[]>> {
    return request(`/user-tags/lists`, where)
}


/**
 * 创建标签api
 */
export const createdUserTagsApi: string = '/user-tags/created'


/**
 * 编辑标签api
 */
export const updatedUserTagsApi: string = '/user-tags/updated'


/**
 * 删除标签API
 */
export function deletedUserTagsApi(id: number): Promise<HttpResult> {
    return request(`/user-tags/deleted`, {id})
}